home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / page777.pag < prev    next >
Portable Network Graphic  |  2008-10-02  |  67KB  |  817x1045  |  8-bit (256 colors)
Labels: chat room | hakham | sky
OCR: COMPUTER PROGRAMMING 709 OBJECT- ORIENTED PROGRAM STRUCTURE What does the completed pizza program look like in Java? So far in this section of the chapter, you have learned how objects and meth- ods interact solve the pizza problem. You know that the pizza program uses Pizza class and two subclasses: RectanglePizza and RoundPizza. You also know that these classes include getSquarelnchPr rice() and getArea( methods to perform calculations that supply data for solving the problem. You should also remember that the compare() method used to manipulate pizza objects to determine which is the best deal. The classes and methods defined for the pizza program must be placed within the structure of a Java program, which contains class definitions, defines methods, initiates the comparison, and outpu ...